<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8" import="javax.servlet.http.HttpSession,com.bsierp.business.pojo.Employee,com.bsierp.util.Constants" %>
<%@ include file="/util/taglibs.jsp" %>

<%  

HttpSession ses = pageContext.getSession();
Employee em = null;
if(ses.getAttribute(Constants.employee_sessionindex)!=null){
	
		em=(Employee)ses.getAttribute(Constants.employee_sessionindex);
	}

 %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
<p><img src="<%=request.getContextPath()+Constants.employee_photopath+"/"+em.getEmployeePhoto() %>" width="128" height="128"  id="employeephoto"><input name="file" type="file" id="employeephotofile"  onChange="uploadEmployeePhoto()"/></p>
<p>员工姓名：
  <label>
  <input name="employeename" type="text" id="updateemployeename" size="15" value="<%=em.getEmployeeName()%>">
  </label>
  姓别：
  <label>
  <select name="employeegender" id="updateemployeegender">
         <%
     String[] s={"","男","女"};
     for(int i=0;i<s.length;i++){
     if(em.getEmployeeGender()==i){
     out.println("<option selected=\"selected\" value=\""+i+"\">"+s[i]+"</option>");
     }else{
     out.println("<option value=\""+i+"\">"+s[i]+"</option>");
     }
     }
     %>
  </select>
  </label> 
  年龄：
  <input name="employeeage" type="text" id="updateemployeeage" size="8" value="<%=em.getEmployeeAge() %>">
  出生日期：
  <input name="employeebirthdate" value="<%=em.getEmployeeBirthday() %>" type="text" id="updateemployeebirthdate" class="Wdate" onFocus="WdatePicker({isShowClear:false,readOnly:true,skin:'whyGreen'})" size="12">
</p>
  身份证号：
  <label>
  <input name="employeeidcard" type="text" id="updateemployeeidcard" value="<%=em.getEmployeeIdcard() %>">
  </label> 学历：<app:DisplayEducationHtmlSelect id="updateemployeeeducation" usetype="edit"/>
籍贯：
<app:DisplayNativePlaceHtmlSelect id="updateemployeenativeplace" usetype="edit"/>
婚姻状况：
  <select name="employeemerriage" id="updateemployeemerriage">
     <%
     
     String[] sa={"","未婚","已婚","离异"};
     for(int i=0;i<s.length;i++){
     if(em.getEmployeeGender()==i){
     out.println("<option selected=\"selected\" value=\""+i+"\">"+sa[i]+"</option>");
     }else{
     out.println("<option value=\""+i+"\">"+sa[i]+"</option>");
     }
     }
  
     %>
    
    </select> 
  <p>联系地址：
  <label>
  <input name="employeeaddress" type="text" id="updateemployeeaddress" value="<%=em.getEmployeeAddress() %>">
  </label> 
  联系电话：
  <input name="employeephone" type="text" id="updateemployeephone" size="12" value="<%=em.getEmployeePhone() %>">
</p>
<p>雇用时间：<input name="employeehiredate" value="<%=em.getEmployeeHiredate() %>" type="text" id="updateemployeehiredate" class="Wdate" onFocus="WdatePicker({isShowClear:false,readOnly:true,skin:'whyGreen'})" size="12">


雇用类型：
<app:DisplayHireTypeHtmlSelect id="updateemployeehiretype" usetype="edit"/>
工号：
<input name="employeenumber" value="<%=em.getEmployeeNumber()%>" type="text" id="updateemployeenumber" size="8" >
</p>

部门：<app:DisplayDepartmentHtmlSelect id="updateemployeedepartment" usetype="edit"/>
职位：<app:DisplayPositionHtmlSelect id="updateemployeeposition" usetype="edit"/>
工种：<app:DisplayProfessionHtmlSelect id="updateemployeeprofession" usetype="edit"/>
<p>开户银行：<app:DisplayBankHtmlSelect id="updateemployeebank" usetype="edit"/>
帐号：
  <input name="employeebankaccount" type="text" id="updateemployeebankaccount" value="<%=em.getEmployeeBankaccount() %>">
 状态：<app:DisplayEmployeeStateHtmlSelect usetype="edit" id="updateemployeestate"/>
</p>
<input type="button" value="保存" onClick="updateEmployee()"/>

</body>
</html>